<?php defined('_JEXEC') or die; ?>
<!--
<style>
img{border: none;}
.bg_alert{ width:270px; height:115px; background:url(templates/tpl_automobil/images/bg_alert.png) no-repeat top left; margin:0px auto; padding:15px 0px 0px 83px; color:#000;}
.m35l{ margin-left:35px;}
</style> 
<div class="bg_alert" id="show_popup" style="display:none; position: fixed; top: 35%; left: 50%; z-index:10001; margin-left:-140px;">
	<span id="f_focus" style="display:none;"></span>
	<div style="margin:0; padding-top:10px; padding-right:20px; min-height:60px;" id="alert"></div>
	<div style="padding-left: 40px;"><a href="javascript:void(0);" onclick="close_popup();"><img src="templates/tpl_automobil/images/bt_luk1.png" alt="" /></a></div>
</div>
<div style="display: none;position: fixed; top: 0;left: 0;width: 100%;height: 100%;background-color: #000000;z-index:10000;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);" id="backoverlay"></div>
 -->
 <script type="text/javascript">
	$(document).ready(function(){
	   
	$("#btn_submit").click(function(){
	   confirm();
	});
    
    confirm=function(){
        var flag = true;
        if($('#email').val() == ""){
			$('#alert').html('Udfyld venligst email');
			$('#backoverlay').show();
			$('#show_popup').show();
			$('#f_focus').html('email');
			flag = false;	
        }
        else{
            if(!isEmail($('#email').val())){
                $('#alert').html('Venligst e-mail er gyldig');
                $('#backoverlay').show();
                $('#show_popup').show();
                $('#s_focus').html('email');
                flag = false;
            }
        }
        if(flag == true) {$('#thai_emailcheck').submit(); }
        
	};
    
        isEmail=function(string) {
    		if (string.search(/^\w+((-\w+)|(\.\w+)|(\_\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
    			return true;
    		else return false;
        };
        
        close_popup=function(){		
    		var fel=$('#f_focus').html();
            $('#backoverlay').hide();
    		$('#show_popup').hide();
    		$('#' + fel ).focus();
    	};
        
    });

</script>
  <script type="text/javascript">
          jQuery(document).ready(function(cash) {
            //jQuery("#system-message").hide();
            //jQuery("#informessage").html(jQuery("#system-message  ul li").html());
            if(jQuery("#system-message  ul li").html()!=null)
               // alert(jQuery("#system-message  ul li").html());
              
              {
             $('#alert').html(jQuery("#system-message  ul li").html());
                $('#backoverlay').show();
		      	$('#show_popup').show();
                      
        	};
              
                
            });
</script> 
	<div class="w739 float_right">
		<div class="">
		<!-- 	<div class="banner_under"> <img src="templates/tpl_automobil/images/banner_under.jpg"/></div>-->
			<div class="tt  p5t">	<?php echo $this->escape($this->params->get('page_title')); ?></div>
		</div>
		<div class="p5t">
			  <div class="p10l p15t mh320">     

				    <form action="<?php echo JRoute::_( 'index.php?option=com_user&task=requestreset' ); ?>" method="post"  id="thai_emailcheck" name="emailcheck">

					<p><?php echo JText::_('RESET_PASSWORD_REQUEST_DESCRIPTION'); ?></p><br/>
					<div style="float:left; width:350px;">
					<label for="email" title="<?php echo JText::_('RESET_PASSWORD_EMAIL_TIP_TEXT'); ?>">
					<?php echo JText::_('E-mail'); ?>:</label>
					<input class="nyhed_txt" id="email" name="email" type="text"/>
					</div>
					<div style="float:left;">
					<a id="btn_submit" href="javascript:void(0);">
					<img src="templates/tpl_automobil/images/bt_indsend.jpg"/></a>
					</div>
					<br style="clear:both;" />
	<!--<button type="button" id="btn_submit" style="display: none;"><?php echo JText::_('Indsende'); ?></button>-->
				<?php echo JHTML::_( 'form.token' ); ?>
				</form>
			</div>      
		</div>
	</div>
                  
                     
	
